﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Web.Framework.Controls;
using Web.Framework.Translate;

namespace Web.PuntoDeVenta.Code.FrontEnd
{
    public class VentaCabecera
    {
        public VentaCabecera()
        {
            detalleVentas = new List<VentaDetalle>();
        }

        public static List<ColumnMetadata> ColumnMetadata = new List<ColumnMetadata>()
            {
                 new ColumnMetadata() { ColumnNameProperty = "Id", ColumnDescription="", Order = 1, Visible = false},
                 new ColumnMetadata() { ColumnNameProperty = "NroTransaccion", ColumnDescription= LocalizationProvider.Instance["Venta.NroTransaccion"], Order = 2, Visible = true},
                 new ColumnMetadata() { ColumnNameProperty = "FechaVenta", ColumnDescription=LocalizationProvider.Instance["Venta.FechaDeVenta"], Order = 3, Visible = true, FormatString="dd/MM/yyyy"},
                 new ColumnMetadata() { ColumnNameProperty = "Talonario", ColumnDescription=LocalizationProvider.Instance["Venta.Talonario"], Order = 4, Visible = true},
                 new ColumnMetadata() { ColumnNameProperty = "Prefijo", ColumnDescription=LocalizationProvider.Instance["Venta.Prefijo"], Order = 5, Visible = true},
                 new ColumnMetadata() { ColumnNameProperty = "NumeroFactura", ColumnDescription=LocalizationProvider.Instance["Venta.NroFactura"], Order = 6, Visible = true},
                 new ColumnMetadata() { ColumnNameProperty = "MontoTotal", ColumnDescription=LocalizationProvider.Instance["Venta.Monto"], Order = 7, Visible = true, FormatString="$0.00;$-0.00"},
                 new ColumnMetadata() { ColumnNameProperty = "PuntoVenta", ColumnDescription=LocalizationProvider.Instance["PuntoDeVenta"], Order = 8, Visible = true},
                 new ColumnMetadata() { ColumnNameProperty = "SalesMan", ColumnDescription=LocalizationProvider.Instance["Venta.Vendedor"], Order = 9, Visible = true},
                 new ColumnMetadata() { ColumnNameProperty = "Cupon", ColumnDescription=LocalizationProvider.Instance["Venta.Cupon"], Order = 10, Visible = true},
                 new ColumnMetadata() { ColumnNameProperty = "detalleVentas", ColumnDescription="", Order = 9, Visible = false, IsNestedList= true, ColumnNestedMetadataCollection = VentaDetalle.ColumnMetadata},
            };

        public List<VentaDetalle> detalleVentas { get; set; }

        public int Id { get; set; }

        public string NroTransaccion { get; set; }

        public DateTime FechaVenta { get; set; }

        public short? Talonario { get; set; }

        public int? Prefijo { get; set; }

        public string NumeroFactura { get; set; }

        public decimal? MontoTotal { get; set; }

        public string PuntoVenta { get; set; }

        public string SalesMan { get; set; }

        public string Cupon { get; set; }
    }
}